package org.java.item.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.java.item.entity.Brand;
import java.util.List;

/**
 * @author WHQ
 * @version 1.0
 * @date 2022-3-5 0005 下午 3:15
 */
public interface BrandMapper extends BaseMapper<Brand> {
    /**
     * 查询所有品牌
     * @return
     */
    @Select("select * from shopping_brand")
    public List<Brand> selectAll();

    /**
     * 根据主键删除品牌
     * @param id
     * @return
     */
    @Delete("delete from shopping_brand where id=#{id}")
    int deleteByPrimaryKey(@Param("id") Long id);
}
